home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / pbase.arc / PBASE.DOC < prev    next >
Encoding:
Text File  |  1985-10-08  |  48.0 KB  |  1,981 lines

  1. .po 1
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                             PREFACE
  8.  
  9.           Welcome to pBASE!
  10.  
  11.           pBASE is a "programmable" Data Base Management System (DBMS) featuring a
  12.           fourth generation language.
  13.  
  14.           This is an EVOLUTIONARY system... you can help by suggesting changes and
  15.           enhancements... your feedback is essential.  For example, the following
  16.           should be available in the next version:
  17.  
  18.                - improved color support (SET COLOR ...)
  19.  
  20.                - report enhancements (XTAB, etc.)
  21.  
  22.                - improved argument editing
  23.  
  24.                - program (.PRG) generator
  25.  
  26.                - improved debugging and error facilities (messages and ONERROR)
  27.  
  28.                - additional functions
  29.  
  30.           The following are possible LONG term additions:
  31.  
  32.                - form and report screen "painter"
  33.  
  34.                - C language interface to DBMS engine
  35.  
  36.                - long text or memo field support with integrated editor
  37.  
  38.                - C and/or PASCAL code generation
  39.  
  40.                - SQL ALTER TABLE
  41.  
  42.                - Naive user interface
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.           ----- NOTICE ----- NOTICE ----- NOTICE ----- NOTICE ----- NOTICE -----
  50.  
  51.           THIS DOCUMENTATION PACKAGE IS INCOMPLETE AND WAS EXTRACTED FROM VERSION 1 OF
  52.           THE pBASE USER MANUAL.  THE COMPLETE DOCUMENTATION AND CURRENT VERSION OF
  53.           pBASE IS AVAILABLE FOR A NOMINAL FEE.
  54.  
  55.           THE POWER AND FLEXIBILITY OF pBASE IS BEST DEMONSTRATED BY REVIEWING THE
  56.           SAMPLE PROGRAMS IN CONJUNCTION WITH THE DOCUMENTATION (sic).
  57.  
  58.           ----- NOTICE ----- NOTICE ----- NOTICE ----- NOTICE ----- NOTICE -----
  59.  
  60.                                           
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.                                   TTTaaabbbllleee   ooofff   CCCooonnnttteeennntttsss
  76.  
  77.  
  78.                 1. Introduction..........................................1
  79.                    1.1. Disclaimer.......................................1
  80.                    1.2. Overview.........................................2
  81.                    1.3. Highlights.......................................2
  82.                         1.3.1. Querying Data.............................2
  83.                         1.3.2. Writing Reports...........................2
  84.                         1.3.3. Application Programs......................2
  85.                    1.4. Operational Requirements.........................3
  86.  
  87.                 2. Quick Tutorial........................................4
  88.                    2.1. Relational Model.................................4
  89.                         2.1.1. Tables....................................4
  90.                         2.1.2. Operations on Tables......................4
  91.                         2.1.3. Data Types................................4
  92.                         2.1.4. Indexes...................................4
  93.                    2.2. Structured Query Language (SQL)..................5
  94.                         2.2.1. Creating and Removing a Table.............5
  95.                         2.2.2. Retrieving Table Data.....................5
  96.                         2.2.3. Adding Table Data.........................5
  97.                         2.2.4. Updating Table Data.......................6
  98.                         2.2.5. Deleting Table Data.......................6
  99.                         2.2.6. Creating and Removing an Index............6
  100.                         2.2.7. Multiple Tables...........................6
  101.                         2.2.8. The Catalog...............................6
  102.  
  103.                 3. Reference Section.....................................7
  104.                    3.1. How to Use the Reference Section.................7
  105.                    3.2. Terminology......................................8
  106.                         3.2.1. Special Symbols...........................8
  107.                         3.2.2. Logical Operators.........................9
  108.                         3.2.3. Arithmetic Operators.....................10
  109.                    3.3. Reserved Words..................................11
  110.                    3.4. Macros..........................................12
  111.                         3.4.1. Basic Macro Substitution.................12
  112.                         3.4.2. Program Argument Macros..................12
  113.                         3.4.3. SQL Command "Bind" Macros................13
  114.                    3.5. Memory Variables................................14
  115.                    3.6. Application Commands............................15
  116.                         3.6.1. *........................................18
  117.                         3.6.2. :........................................19
  118.                         3.6.3. ASSIGN...................................20
  119.                         3.6.4. CANCEL...................................21
  120.                         3.6.5. CLEAR LINE...............................22
  121.                         3.6.6. CLEAR MESSAGE............................23
  122.                         3.6.7. CLEAR SCREEN.............................24
  123.                         3.6.8. CREATE WINDOW............................25
  124.                         3.6.9. DOCASE...................................26
  125.  
  126.                                           i
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.                         3.6.10. DOMENU..................................27
  143.                         3.6.11. DOREPORT................................29
  144.                         3.6.12. DOWHILE.................................32
  145.                         3.6.13. DROP FORM...............................33
  146.                         3.6.14. DROP VARIABLE...........................34
  147.                         3.6.15. DROP WINDOW.............................35
  148.                         3.6.16. ENTER...................................36
  149.                         3.6.17. FILECLOSE...............................37
  150.                         3.6.18. FILECLOSE...............................38
  151.                         3.6.19. FILEREAD................................39
  152.                         3.6.20. FILEWRITE...............................40
  153.                         3.6.21. FORM....................................41
  154.                         3.6.22. IF......................................43
  155.                         3.6.23. PAUSE...................................44
  156.                         3.6.24. POSITION................................45
  157.                         3.6.25. QUIT....................................46
  158.                         3.6.26. RESET FORM..............................47
  159.                         3.6.27. RESET REPORT............................48
  160.                         3.6.28. RETURN..................................49
  161.                         3.6.29. RUN.....................................50
  162.                         3.6.30. SHOW ERROR..............................51
  163.                         3.6.31. SHOW MESSAGE............................52
  164.                         3.6.32. SHOW VARIABLE...........................53
  165.                         3.6.33. SHOW (text).............................54
  166.                         3.6.34. SOUND...................................55
  167.                         3.6.35. STATUS SWITCH...........................56
  168.                         3.6.36. STATUS VARIABLE.........................57
  169.                         3.6.37. SUSPEND.................................58
  170.                         3.6.38. SWITCH DEFAULT..........................59
  171.                         3.6.39. SWITCH ECHO.............................60
  172.                         3.6.40. SWITCH ERROR............................61
  173.                         3.6.41. SWITCH STEP.............................62
  174.                         3.6.42. SWITCH TALK.............................63
  175.                         3.6.43. USE WINDOW..............................64
  176.                         3.6.44. VERSION.................................65
  177.                    3.7. Data Base Commands..............................66
  178.                         3.7.1. CREATE CURSOR............................68
  179.                         3.7.2. CREATE DATABASE..........................69
  180.                         3.7.3. CREATE INDEX.............................70
  181.                         3.7.4. CREATE TABLE.............................71
  182.                         3.7.5. DELETE...................................72
  183.                         3.7.6. DROP CURSOR..............................73
  184.                         3.7.7. DROP DATABASE............................74
  185.                         3.7.8. DROP INDEX...............................75
  186.                         3.7.9. DROP TABLE...............................76
  187.                         3.7.10. EXPORT..................................77
  188.                         3.7.11. FETCH...................................78
  189.                         3.7.12. IMPORT..................................79
  190.                         3.7.13. INSERT..................................80
  191.  
  192.                                          ii
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.                         3.7.14. RESET DATABASE..........................81
  208.  
  209.                         3.7.15. SELECT..................................82
  210.                         3.7.16. SET PRINT...............................83
  211.                         3.7.17. SHOW....................................84
  212.                         3.7.18. STATUS CURSOR...........................85
  213.                         3.7.19. STATUS TABLE............................86
  214.                         3.7.20. TEMPLATE PRINT..........................87
  215.                         3.7.21. UPDATE..................................88
  216.                         3.7.22. USE CURSOR..............................89
  217.                         3.7.23. Predicate...............................90
  218.                    3.8. Functions.......................................91
  219.                         3.8.1. String Functions.........................91
  220.                         3.8.2. Boolean Status Functions.................92
  221.                         3.8.3. Status Functions.........................93
  222.                    3.9. Form Processor..................................94
  223.                         3.9.1. Commands.................................94
  224.                         3.9.2. Programming with Forms...................95
  225.                         3.9.3. Examples.................................97
  226.                         3.9.4. Processing Individual Fields............103
  227.                         3.9.5. Programming Shortcuts...................104
  228.                    3.10. Report Writer.................................106
  229.                          3.10.1. Commands..............................106
  230.                          3.10.2. Runtime Execution.....................107
  231.                          3.10.3. Simple Reports........................108
  232.                          3.10.4. Professional-Looking Reports..........109
  233.                                  3.10.4.1. Positioning with TAB and S..109
  234.                                  3.10.4.2. Page Headings and Footings..110
  235.                                  3.10.4.3. Element Formatting..........111
  236.                          3.10.5. Summaries and Control Breaks..........113
  237.                                  3.10.5.1. Counting Example............114
  238.                                  3.10.5.2. Totaling Example............115
  239.                                  3.10.5.3. Summary Example.............116
  240.                          3.10.6. Cross-tabulations.....................117
  241.  
  242.                 4. Appendices..........................................118
  243.                    4.1. Error Messages.................................118
  244.                    4.2. Limits.........................................126
  245.                    4.3. Defaults.......................................127
  246.                    4.4. Console Format.................................128
  247.                    4.5. Backup (and Restore)...........................129
  248.                    4.6. Catalog........................................130
  249.  
  250.                  Index.................................................131
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.                                          iii
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.                                           Introduction
  272.  
  273.           1. Introduction
  274.  
  275.           1.1. Disclaimer
  276.  
  277.           The information contained in this document is subject to change without
  278.           notice.
  279.  
  280.           THE AUTHOR OR SUPPLIER MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
  281.           MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  282.           MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  The author or
  283.           supplier shall not be liable for errors contained herein or for incidental
  284.           or consequential damages in connection with the furnishing, performance or
  285.           use of this material.
  286.  
  287.           This document contains proprietary information which is protected by
  288.           copyright laws.  All rights are reserved.  No part of this document may be
  289.           reproduced without the prior written concept of the author.
  290.  
  291.                               (C) COPYRIGHT 1985 4B Associates
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                                           1
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.                                           Introduction
  338.  
  339.           1.2. Overview
  340.  
  341.           pBASE is a "programmable relational data base management system designed for
  342.           programmers. pBASE provides facilities for querying and manipulating data as
  343.           well as report writing.
  344.  
  345.           pBASE represents all data as a table.  For example, a sample table of two
  346.           rows and four columns:
  347.  
  348.                -----------------------------------------------------
  349.                |CHK_NUMBER|DATE    |PAYEE               |AMOUNT    |
  350.                |----------|--------|--------------------|----------|
  351.                |1000      |01/02/85|Utility Company     |    123.45|
  352.                |1001      |01/10/85|Grocery Store       |     66.77|
  353.                -----------------------------------------------------
  354.  
  355.           1.3. Highlights
  356.  
  357.           1.3.1. Querying Data
  358.  
  359.           pBASE may be used to access data, using pBASE commands, without the need for
  360.           user-written computer programs.  pBASE commands are available to:
  361.  
  362.                - select and update data
  363.  
  364.                - sort retrieved data in a specified sequence
  365.  
  366.                - do calculations using data values
  367.  
  368.           1.3.2. Writing Reports
  369.  
  370.           pBASE provides formatting commands that control how queried data is
  371.           displayed.
  372.  
  373.           1.3.3. Application Programs
  374.  
  375.           pBASE provides commands to develop application programs.  Procedural and
  376.           non-procedural commands control program logic flow and interface to external
  377.           hardware devices.
  378.  
  379.           Commands may be stored in files and executed.
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.                                           2
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.                                           Introduction
  404.  
  405.           1.4. Operational Requirements
  406.  
  407.                IBM PC 256K or equivalent
  408.  
  409.                PCDOS 2.0+
  410.  
  411.                Hard disk preferred
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.                                           3
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.                                          Quick Tutorial
  470.  
  471.           2. Quick Tutorial
  472.  
  473.           This section presents a quick introduction to pBASE.  It is a VERY basic
  474.           tutorial on relational data base concepts.
  475.  
  476.           2.1. Relational Model
  477.  
  478.           pBASE utilizes the relational model of data. A RELATION is defined as a
  479.           simple two-dimensional table having a specific number of columns and zero or
  480.           more unordered rows.  Each row represents one entry in a table and
  481.           corresponds to a record in a traditional file format.  Each row contains a
  482.           value or NULL entry in each column.
  483.  
  484.           2.1.1. Tables
  485.  
  486.           2.1.2. Operations on Tables
  487.  
  488.           Many operations may be performed on a table and include:
  489.  
  490.                - Creating/droping tables
  491.  
  492.                - Retrieving data.  An entire table, row, or partial row may be
  493.                retrieved.
  494.  
  495.                - Updating data.
  496.  
  497.                - Adding data.
  498.  
  499.                - Deleting data.
  500.  
  501.                - Combining of tables based on table content value.  This operation is
  502.                called "joining."
  503.  
  504.           2.1.3. Data Types
  505.  
  506.           pBASE supports two data types:
  507.  
  508.                - NUMBER
  509.  
  510.                - CHARACTER
  511.  
  512.           2.1.4. Indexes
  513.  
  514.           pBASE also provides an indexing facility.  Indexes are NOT required to
  515.           access data.  They may be used to improve the performance of accessing table
  516.           rows.  A request to access or update data makes no explicit reference to an
  517.           index.  pBASE always decides which indexes, if any, to use to satisfy a
  518.           request.  Commands are provided to create and drop indexes.
  519.  
  520.  
  521.  
  522.                                           4
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.                                          Quick Tutorial
  536.  
  537.           2.2. Structured Query Language (SQL)
  538.  
  539.           pBASE is based on the STRUCTURED QUERY LANGUAGE (SQL).  pBASE is a non-
  540.           procedural language because data access requests specify the desired
  541.           results, not how to do it.
  542.  
  543.           pBASE commands consist of a command verb, one or more optional clauses,
  544.           language keywords, and parameter operands.  The most common pBASE commands
  545.           include:
  546.  
  547.                (retrieval)
  548.                     SELECT         Fetches data from one or more tables
  549.  
  550.                (manipulation)
  551.                     INSERT         Adds a new table row
  552.                     UPDATE         Changes data in one or more table rows
  553.                     DELETE         Deletes one or more table rows
  554.  
  555.                (definition)
  556.                     CREATE TABLE   Defines a new table and it's column attributes
  557.                     DROP TABLE     Removes a table
  558.                     CREATE INDEX   Defines a table index (on a column)
  559.                     DROP INDEX     Removes a table index
  560.  
  561.           2.2.1. Creating and Removing a Table
  562.  
  563.           Before data can be stored, updated, or retrieved, a table must be created.
  564.           The CREATE TABLE command is used to create a table and define it's format.
  565.           The command does not add a data to the table.
  566.  
  567.           2.2.2. Retrieving Table Data
  568.  
  569.           Retrieving data is the most common request of pBASE. The SELECT command is
  570.           used to specify what data is to be retrieved.  The basic form of the SELECT
  571.           command is:
  572.  
  573.                SELECT <data>
  574.                FROM <table>
  575.                WHERE <condition>
  576.  
  577.           2.2.3. Adding Table Data
  578.  
  579.  
  580.           The INSERT command allows the user to pass a row of values to be placed into
  581.           a table.  For example:
  582.  
  583.                INSERT INTO <table> (<column-list>) VALUES(<value-list>)
  584.  
  585.  
  586.  
  587.  
  588.                                           5
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.                                          Quick Tutorial
  602.  
  603.           2.2.4. Updating Table Data
  604.  
  605.           The UPDATE command specifies which column(s) should be updated and on which
  606.           rows the updating should take place.  For example:
  607.  
  608.                UPDATE <table> SET <column-name>=<value> ...
  609.  
  610.           A single UPDATE command can affect more than one row in a table and more
  611.           than one field in those rows.
  612.  
  613.           2.2.5. Deleting Table Data
  614.  
  615.           The DELETE command specifies which rows should be deleted from a table.  The
  616.           WHERE clause determines which rows are affected.  For example:
  617.  
  618.                DELETE FROM <table>
  619.                  WHERE <predicate>
  620.  
  621.           2.2.6. Creating and Removing an Index
  622.  
  623.           Query and manipulation of tables can be handled by pBASE without any
  624.           explicit specification from the user.  However, better performance is
  625.           possible when indexes are defined for appropriate table columns.  For
  626.           example:
  627.                CREATE INDEX <index> ON <table> (<column-list>)
  628.  
  629.           The index is never referenced when using pBASE commands.  pBASE analyzes
  630.           commands and indexes and uses the best access path to the table(s).
  631.  
  632.           2.2.7. Multiple Tables
  633.  
  634.           pBASE allows data stored in different tables to be combined.  This
  635.           technique, called joining, causes pBASE to merge data from different tables
  636.           and present the data.  (The merged data is not stored in the data base.)
  637.           For example:
  638.  
  639.                SELECT <column-list> FROM <table>,<table> WHERE <predicate>
  640.  
  641.  
  642.           2.2.8. The Catalog
  643.  
  644.           pBASE maintains several system tables that collectively "catalog" the
  645.           contents of the database.  These tables contain information about objects
  646.           that are of interest to the execution of the system itself.  Examples of
  647.           such objects includes base tables, indexes, column types, column sizes, etc.
  648.           Because the catalog itself consists of tables, just like ordinary user
  649.           tables, a subset of pBASE commands may be used to view the contents of these
  650.           tables.
  651.  
  652.  
  653.  
  654.                                           6
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.                                        Reference Section
  668.  
  669.           3. Reference Section
  670.  
  671.           3.1. How to Use the Reference Section
  672.  
  673.           This section contains the formal definition of all pBASE commands.  It
  674.           includes:
  675.  
  676.                - the proper syntax
  677.  
  678.                - a definition
  679.  
  680.                - one or more examples
  681.  
  682.           The commands are subdivided by type, application and data base.  In
  683.           addition, reserved words and terminology are listed and special features are
  684.           covered in detail:
  685.  
  686.                macros, memory variables, functions, forms, report writer
  687.  
  688.  
  689.           A typical example of command syntax is:
  690.  
  691.                SHOW ERROR '<text>'
  692.  
  693.           where capitalized words are pBASE keywords and lower case words are general
  694.           terms for what should be entered.  Square brackets ([]) mean that anything
  695.           within the square brackets is an optional entry.  Curly brackets ({}) mean
  696.           that within the curly brackets there are two or more mutually exclusive
  697.           items that may be entered.  The choices are separated by a vertical bar (|).
  698.  
  699.           pBASE keywords may NOT be abbreviated.
  700.  
  701.           Command lines may extend over several lines.  Lines may be continued by
  702.           appending a semicolon (;) at the end of the line.  Continuation is valid in
  703.           interactive and program modes.  For example:
  704.  
  705.                pBASE> SELECT column1,column2 FROM table;
  706.                pBASE> WHERE column3>45;
  707.                pBASE> ORDER BY column2,column1
  708.  
  709.  
  710.           A literal string is indicated by enclosing the string in single (') or
  711.           double (") quotation marks.
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.                                           7
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.                                 Reference Section - Terminology
  734.  
  735.           3.2. Terminology
  736.  
  737.  
  738.           3.2.1. Special Symbols
  739.  
  740.  
  741.                <attribute> - an integer between 1 and 255
  742.  
  743.                <arguments> - a list of blank-separated identifiers
  744.  
  745.                <base-col> - a number between 1 and the maximum width of the display 
  746.                screen
  747.  
  748.                <base-row> - a number between 1 and the maximum depth of the display 
  749.                screen
  750.  
  751.                <border-type> - 1 (single line) or 2 (double line)
  752.  
  753.                <bottom-margin> - a number between 1 and the size of a printed page
  754.  
  755.                <column#> - a number between 1 and the width of a display screen or 
  756.                printed page
  757.  
  758.                <column-definition> - a list of comma-separated <column-name>  <column-
  759.                type> pairs
  760.  
  761.                <column-name> - an identifier
  762.  
  763.                <column-type> - CHAR(<size>) or NUMBER
  764.  
  765.                <command-line> - a program name with optional trailing <arguments>
  766.  
  767.                <comment> - any meaningful <text>
  768.  
  769.                <constant> - a literal number or string
  770.  
  771.                <cursor#> - a number between 1 and maximum cursors
  772.  
  773.                <database-name> - 1-8 characters valid for a DOS filename
  774.  
  775.                <depth> - a number between 1 and maximum <depth>
  776.  
  777.                <expression> - an identifier or group of identifiers and operators 
  778.                whose value can be determined
  779.  
  780.                <field#> - a number between 1 and maximum fields
  781.  
  782.                <filename> - a valid DOS file specification
  783.  
  784.  
  785.  
  786.                                           8
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.                                 Reference Section - Terminology
  800.  
  801.  
  802.                <index-name> - an identifier name
  803.  
  804.                <line#> - a number between 1 and maximum lines
  805.  
  806.                <picture> - (see Reference Section - Report Writer Element Formatting)
  807.  
  808.                <predicate> - (see Reference Section - Predicate)
  809.  
  810.                <program-name> - a valid DOS file specification with a ".COM", ".EXE",
  811.                     ".BAT" or ".PRG"
  812.  
  813.                <row#> - a number between 1 and maximum rows
  814.  
  815.                <skeleton> - a wildcard specification containing characters and "?"
  816.  
  817.                <table-name> - an identifier
  818.  
  819.                <template-file> - a DOS file with a ".TMP" extension
  820.  
  821.                <text> - any "printable" ascii characters
  822.  
  823.                <title> - string value
  824.  
  825.                <top-margin> - a number between 1 and the depth of a console screen or
  826.                     printed page
  827.  
  828.                <variable-name> - an identifier
  829.  
  830.                <width> - a number between 1 and the width of a console screen or 
  831.                printed page
  832.  
  833.                <window#> - integer between 1 and maximum concurent windows
  834.  
  835.           3.2.2. Logical Operators
  836.  
  837.                (listed in order of precedence)
  838.  
  839.                ()   parentheses for grouping
  840.  
  841.                NOT  logical not (unary operator)
  842.  
  843.                AND  logical and
  844.  
  845.                OR   logical or
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.                                           9
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.                                 Reference Section - Terminology
  866.  
  867.           3.2.3. Arithmetic Operators
  868.  
  869.                (listed in order or precedence)
  870.  
  871.                ()   parentheses for grouping
  872.  
  873.                *    multiplication
  874.  
  875.                /    division
  876.  
  877.                +    addition
  878.  
  879.                -    subtraction
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.                                          10
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.                                Reference Section - Reserved Words
  932.  
  933.           3.3. Reserved Words
  934.  
  935.           The following "words" are reserved by pBASE.  They may NOT be used as memory
  936.           variable names or identifiers:
  937.  
  938.           AND            ASC            ALL            AND            ASSIGN
  939.           AT             BOOLEAN        BREAK          BY             CANCEL
  940.           CASE           CHAR           CLEAR          COLOR          COLUMN
  941.           CONCAT         CONSOLE        COUNT          CREATE         CURSOR
  942.           DATABASE       DBRET          DEBUG          DEFAULT        DEL
  943.           DELETE         DESC           DETAIL         DISPLAY        DOCASE
  944.           DOMENU         DOREPORT       DOWHILE        DROP           ECHO
  945.           EJECT          ELSE           END            ENDCASE        ENDIF
  946.           ENDMENU        ENDONERROR     ENDREPORT      ENDWHILE       ENTER
  947.           ERASE          ERROR          EXIT           EXPORT         FALSE
  948.           FETCH          FIELD          FILECLOSE      FILEOPEN       FILEREAD
  949.           FILEWRITE      FINAL          FOOTING        FOR            FORM
  950.           FORMAT         GETDATE        GETENV         GETTIME        HEADING
  951.           HORZ           IF             IMPORT         INDEX          INS
  952.           INSERT         INTO           ISEOF          ISFEOF         ISFILE
  953.           ISNUMBER       ISYES          KEY            KEYPRESS       LIKE
  954.           LINE           LOCK           LOOP           MATCH          MENUCHOICE
  955.           MENUOPTION     MENUTITLE      MENUTYPE       MESSAGE         NOT
  956.           NULL           NUMBER         OFF            ON             ONERROR
  957.           OR             ORDER          OTHERWISE      OUTPUT         PAGE
  958.           PAUSE          PICTURE        POSITION       PRINT          PRINTER
  959.           PROMPT         QUIT           READ           REP            REPORT
  960.           RESET          RETURN         ROW            RUN            SCREEN
  961.           SELECT         SET            SHOW           SKIP           SOUND
  962.           STATUS         STEP           SUBCOUNT       SUBSTR         SUBTOTAL
  963.           SUSPEND        SWITCH         SYSDATE        SYSOTHER       SYSPAGE
  964.           SYSTIME        SYSTOTAL       TAB            TABLE          TALK
  965.           TEMPLATE       TEXT           TO             TOLOWER        TOTAL
  966.           TOUPPER        TRUE           UNLOCK         UPDATE         UPDPOS
  967.           USE            VALUES         VARIABLE       VERSION        VERT
  968.           WHERE          WIDTH          WINDOW         XTAB
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.                                          11
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.                                    Reference Section - Macros
  998.  
  999.           3.4. Macros
  1000.  
  1001.  
  1002.           3.4.1. Basic Macro Substitution
  1003.  
  1004.  
  1005.           Whenever an ampersand (&) followed by the name of a memory variable is
  1006.           encountered in a command, pBASE replaces the &<variable-name> with the
  1007.           string value of the variable.  If an ampersand is NOT followed by a valid
  1008.           memory variable name no substitution takes place (and the ampersand remains
  1009.           within the command line).
  1010.  
  1011.           Basic macros are very useful for dynamic modification of commands during the
  1012.           actual execution of pBASE programs.  They may also be used to pass
  1013.           parameters between programs.
  1014.  
  1015.           Example:
  1016.  
  1017.                pBASE> ENTER dest PROMPT 'Destination filename of output'
  1018.                pBASE> SET PRINT TO &dest     (at execution time this becomes
  1019.                                              "SET PRINT TO temp.prt" if "temp.prt"
  1020.                                              was entered in response to the ENTER
  1021.                                              command)
  1022.  
  1023.  
  1024.           3.4.2. Program Argument Macros
  1025.  
  1026.  
  1027.           A "special" form of the basic ampersand macro replacement facility is the
  1028.           program argument macro.  Whenever an ampersand followed by an integer number
  1029.           is encountered, pBASE replaces the ampersand and the number with the
  1030.           relative argument corresponding to the number.
  1031.  
  1032.           Example:
  1033.  
  1034.                pBASE> HELP CREATE                 (command HELP with argument CREATE)
  1035.                pBASE> IF TOUPPER('&1')='CREATE'   (At execution time within program
  1036.                                                   HELP.PRG this becomes:
  1037.                                                   "IF TOUPPER('CREATE')='CREATE'")
  1038.                pBASE>    SHOW 'CREATE argument'
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.                                          12
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.                                    Reference Section - Macros
  1064.  
  1065.           3.4.3. SQL Command "Bind" Macros
  1066.  
  1067.  
  1068.           A third form of macro substitution is a special case limited to
  1069.           specification of data base data manipulation command field values and exists
  1070.           to maintain compatibility with SQL programming conventions.  Whenever a
  1071.           colon (:) is encountered within a SQL data manipulation command, the colon
  1072.           and the concatenated memory variable name are replaced by the string value
  1073.           of the memory variable.
  1074.  
  1075.           Example:
  1076.  
  1077.                pBASE> UPDATE SUP SET item=:item,descr=':descr';
  1078.                pBASE> WHERE id=:id                (At execution time this becomes
  1079.                                                   "UPDATE SUP SET item=12,descr=
  1080.                                                    'Red box' WHERE id=1001" assuming
  1081.                                                   that memory variables item, descr,
  1082.                                                   and id contained "12", "Red box",
  1083.                                                   and 12 respectively)
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.                                          13
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.                               Reference Section - Memory Variables
  1130.  
  1131.           3.5. Memory Variables
  1132.  
  1133.  
  1134.           Memory variables are temporary elements that are created and destroyed by
  1135.           commands.  pBASE memory variables do NOT have any notion of TYPE, such as
  1136.           numeric or character.  Their so-called type is implicit based on the content
  1137.           (value) and usage.
  1138.  
  1139.           Memory variables are used to contain constants, results of computations, and
  1140.           (macro) symbolic substitution strings.  Commands that manipulate memory
  1141.           variables include:
  1142.  
  1143.                ASSIGN <expression> TO <variable-name>
  1144.  
  1145.                DROP VARIABLE {<variable-name>|ALL|LIKE <skeleton>}
  1146.  
  1147.                ENTER <variable-name> PROMPT <text>
  1148.  
  1149.                EXPORT VARIABLE {ALL|LIKE <skeleton>} TO <filename>
  1150.  
  1151.                IMPORT VARIABLE FROM <filename>
  1152.  
  1153.                SHOW <variable-name>
  1154.  
  1155.                STATUS VARIABLE
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.                                          14
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.                             Reference Section - Application Commands
  1196.  
  1197.           3.6. Application Commands
  1198.  
  1199.           Application commands support the development and execution of pBASE
  1200.           applications.  Also within this general framework are commands that provide
  1201.           operator assistance.  Following are application commands grouped
  1202.           functionally:
  1203.  
  1204.           Display:
  1205.  
  1206.                CLEAR LINE - Clear a display line
  1207.  
  1208.                CLEAR MESSAGE - Clear display message area
  1209.  
  1210.                CLEAR SCREEN - Clear entire display
  1211.  
  1212.                CREATE WINDOW - Open a window
  1213.  
  1214.                DROP WINDOW - Close a window
  1215.  
  1216.                ENTER - Enter value into memory variable
  1217.  
  1218.                DROP FORM - Remove form window
  1219.  
  1220.                FORM - Non-procedural forms data entry
  1221.  
  1222.                POSITION - Move display cursor to coordinates
  1223.  
  1224.                RESET FORM - Free form resources
  1225.  
  1226.                SHOW ERROR - Display error message
  1227.  
  1228.                SHOW MESSAGE - Display informational message
  1229.  
  1230.                SHOW (text) - Display text string
  1231.  
  1232.                USE WINDOW - Specify "current" window
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.                                          15
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.                             Reference Section - Application Commands
  1262.  
  1263.           File Input/Output:
  1264.  
  1265.                FILECLOSE - Close a DOS file.
  1266.  
  1267.                FILEOPEN - Open a DOS file.
  1268.  
  1269.                FILEREAD - Read a line into a memory variable.
  1270.  
  1271.                FILEWRITE - Write an expression.
  1272.  
  1273.           Memory Variables:
  1274.  
  1275.                ASSIGN - Assign the value of an expression to a memory variable
  1276.  
  1277.                DROP VARIABLE - Destroy a memory variable
  1278.  
  1279.                EXPORT VARIABLE - "Save" variable(s)
  1280.  
  1281.                IMPORT VARIABLE - "Restore" variable(s)
  1282.  
  1283.                SHOW VARIABLE - Display the value of a memory variable
  1284.  
  1285.                STATUS VARIABLE - Display status of memory variable pool
  1286.  
  1287.  
  1288.           Programming:
  1289.  
  1290.                * - Comment line
  1291.  
  1292.                : - DOS command
  1293.  
  1294.                CANCEL - Stop execution of program(s)
  1295.  
  1296.                DOCASE - Execute commands with one of several CASEs
  1297.  
  1298.                DOMENU - Non-procedural menu
  1299.  
  1300.                DOREPORT - Non-procedural report writer
  1301.  
  1302.                DOWHILE - Repeat while condition true
  1303.  
  1304.                IF - Execute commands when condition true
  1305.  
  1306.                PAUSE - Suspend execution temporarily
  1307.  
  1308.                RESET REPORT - Free report writer resources
  1309.  
  1310.                RETURN - Exit program
  1311.  
  1312.                RUN - Execute program
  1313.  
  1314.                                          16
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.                             Reference Section - Application Commands
  1328.  
  1329.  
  1330.                SUSPEND - Temporary interactive mode
  1331.  
  1332.  
  1333.           Other:
  1334.  
  1335.                QUIT - Exit pBASE
  1336.  
  1337.                SOUND - "Beep" the console.
  1338.  
  1339.                STATUS SWITCH - Display current switch status
  1340.  
  1341.                SWITCH DEFAULT - Reset all switches to their defaults
  1342.  
  1343.                SWITCH ECHO - Display executed commands ON|OFF
  1344.  
  1345.                SWITCH ERROR - Display errors ON|OFF
  1346.  
  1347.                SWITCH STEP - Single step execution ON|OFF
  1348.  
  1349.                SWITCH TALK - Echo command results ON|OFF
  1350.  
  1351.                VERSION - Display pBASE version
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.                                          17
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.                              Reference Section - Data Base Commands
  1394.  
  1395.  
  1396.           3.7. Data Base Commands
  1397.  
  1398.           Data base commands either operate on a data base or provide operator
  1399.           assistance for data base related tasks.  Following are data base commands
  1400.           grouped functionally:
  1401.  
  1402.           Data Retrieval:
  1403.  
  1404.                EXPORT - Move table data to external DOS file
  1405.  
  1406.                FETCH - Retrieve SELECTed data into memory variables
  1407.  
  1408.                SELECT - Specify data to be queued for retrieval
  1409.  
  1410.                SHOW - Display queued data at console
  1411.  
  1412.                TEMPLATE PRINT - Template replacement report writer
  1413.  
  1414.  
  1415.           Data Manipulation:
  1416.  
  1417.                DELETE - Delete rows
  1418.  
  1419.                IMPORT - Move external DOS file data into a table
  1420.  
  1421.                INSERT - Add a row to a table
  1422.  
  1423.                UPDATE - Update table rows that satisfy condition
  1424.  
  1425.  
  1426.           Data Definition:
  1427.  
  1428.                CREATE DATABASE - Create an empty data base
  1429.  
  1430.                CREATE INDEX - Create a table column index
  1431.  
  1432.                CREATE TABLE - Create a table
  1433.  
  1434.                DROP DATABASE - Destroy an entire data base
  1435.  
  1436.                DROP INDEX - Destroy an index
  1437.  
  1438.                DROP TABLE - Destroy an entire table
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.                                          66
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.                              Reference Section - Data Base Commands
  1460.  
  1461.           Other:
  1462.  
  1463.                CREATE CURSOR - "Open" an access path to a data base
  1464.  
  1465.                DROP CURSOR - "Close" an access path to a data base
  1466.  
  1467.                RESET DATABASE - Drop all active cursors
  1468.  
  1469.                SET CURSOR - Specify current active cursor
  1470.  
  1471.                SET PRINT - Specify TEMPLATE PRINT output device
  1472.  
  1473.                STATUS CURSOR - Display cursor status
  1474.  
  1475.                STATUS TABLE - Display table(s) status
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.                                          67
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.                                  Reference Section - Functions
  1526.  
  1527.           3.8. Functions
  1528.  
  1529.  
  1530.           Functions are special purpose operations that occur during run-time of a
  1531.           command.  A function performs a specific operation on the (sub)value of an
  1532.           expression.  A function does not occur alone, rather it appears with its
  1533.           related expression in the general form:
  1534.  
  1535.                FUNCTION([expression])
  1536.  
  1537.           Note that all start positions and offsets are relative to one (1).
  1538.  
  1539.           3.8.1. String Functions
  1540.  
  1541.  
  1542.                <concatenated-string> = CONCAT(<string1> <string2>)
  1543.                     Returns concatenation of string1 and string2.
  1544.  
  1545.                <modified-string> = DEL(<string> <count> <start>)
  1546.                     Returns substring of <string> after removing <count> characters at
  1547.                     position <start>.
  1548.  
  1549.                <date> = GETDATE()
  1550.                     Returns system date in mmddyy format.
  1551.  
  1552.                <string> = GETENV(<environment-name>)
  1553.                     Returns environment value.
  1554.  
  1555.                <time> = GETTIME()
  1556.                     Returns system time in hhmmss format.
  1557.  
  1558.                <modified-string> = INS(<string1> <string2> <start>)
  1559.                     Returns expanded string after inserting <string2> into   <string1>
  1560.                     at position <start>.
  1561.  
  1562.                <modified-string> = TOLOWER(<expression>)
  1563.                     Converts the expression to all lower case.
  1564.  
  1565.                <modified-string> = TOUPPER(<expression>)
  1566.                     Converts the expression to all upper case.
  1567.  
  1568.                <index> = MATCH(<string1> <string2> <start>)
  1569.                     Returns the <index> of where <string2> starts within <string1>
  1570.                     relative to <start>.
  1571.  
  1572.                <modified-string> = REP(<string1> <string2> <start>)
  1573.                     Returns modified string after replacing part of <string1> with
  1574.                     <string2> at <start>.
  1575.  
  1576.  
  1577.  
  1578.                                          91
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.                                  Reference Section - Functions
  1592.  
  1593.  
  1594.                <string> = SUBSTR(<expression> <start> <length>)
  1595.                     Extracts a substring of the specified starting position and
  1596.                     length.
  1597.  
  1598.           3.8.2. Boolean Status Functions
  1599.  
  1600.  
  1601.  
  1602.                <boolean> = ISEOF()
  1603.                     Returns TRUE if (data base) END OF FETCH else FALSE.
  1604.  
  1605.                <boolean> = ISFEOF()
  1606.                     Returns TRUE if END OF FILE else FALSE.
  1607.  
  1608.                <boolean> = ISFILE(<filename>)
  1609.                     Returns TRUE if <filename> exists else FALSE.
  1610.  
  1611.                <boolean> = ISNUMBER(<expression>)
  1612.                     Returns TRUE if <expression> is numeric else FALSE.
  1613.  
  1614.                <boolean> = ISYES(<text>)
  1615.                     Displays a menu prompt and returns operator response (TRUE or
  1616.                     FALSE).
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.                                          92
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.                                  Reference Section - Functions
  1658.  
  1659.           3.8.3. Status Functions
  1660.  
  1661.  
  1662.                <return-code> = DBRET()
  1663.                     Returns the current data base status code.
  1664.  
  1665.                <key-value> = KEYPRESS()
  1666.                     Returns the last key pressed by operator.
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.                                          93
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.                                          Form Processor
  1724.  
  1725.           3.9. Form Processor
  1726.  
  1727.           3.9.1. Commands
  1728.  
  1729.           Form processing commands specify what and when data field(s) are entered.
  1730.           Following are form processor commands grouped functionally:
  1731.  
  1732.           Form content:
  1733.  
  1734.                FORM FIELD - Entry field location and size
  1735.  
  1736.                FOR FOR TABLE - Default form text and fields
  1737.  
  1738.                FORM HEADING - Background text heading
  1739.  
  1740.                FORM SHOW FIELD - Display entry field
  1741.  
  1742.                FORM SHOW TEXT - Display background text
  1743.  
  1744.                FORM TEXT - Background text definition
  1745.  
  1746.           Form run-time:
  1747.  
  1748.                FORM CLEAR FIELD - Clear entry field to all blanks
  1749.  
  1750.                FORM ERASE FIELD - Remove entry field from console display
  1751.  
  1752.                FORM LOCK FIELD - Disallow data entry
  1753.  
  1754.                FORM READ FIELD - Read data
  1755.  
  1756.                FORM UNLOCK FIELD - Allow data entry
  1757.  
  1758.           Other:
  1759.  
  1760.                DROP FORM - Close form window
  1761.  
  1762.                RESET FORM - Free form resources
  1763.  
  1764.                FORM DELETE - Auto-DELETE
  1765.  
  1766.                FORM SELECT - Auto-SELECT
  1767.  
  1768.                FORM SELECT - Auto-SELECT
  1769.  
  1770.                FORM UPDATE - Auto-UPDATE
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.                                          94
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.                                          Report Writer
  1790.  
  1791.  
  1792.           3.10. Report Writer
  1793.  
  1794.           3.10.1. Commands
  1795.  
  1796.           Report writer commands specify how, what, and when the contents of a report
  1797.           are printed.  Their actual usage is very hierarchically structured and is
  1798.           graphically represented as follows:
  1799.  
  1800.  
  1801.                <Report-group> ::=
  1802.                     DOREPORT
  1803.                       REPORT XXXX
  1804.                         <Command-group>
  1805.                         END
  1806.                       ENDREPORT
  1807.  
  1808.  
  1809.                <Command-group> ::=
  1810.                      pBASE commands
  1811.                     <Report-group>
  1812.                     <Output-group> (REPORT OUTPUT only)
  1813.  
  1814.  
  1815.                <Print-group> ::=
  1816.                     TAB n
  1817.                     SKIP [n]
  1818.                     EJECT
  1819.                     <string> [PICTURE <picture>]
  1820.                     <variable-name> [PICTURE <picture>]
  1821.                     SYSDATE
  1822.                     SYSTIME
  1823.                     SYSPAGE
  1824.  
  1825.  
  1826.                <Output-group> ::=
  1827.                     TO { CONSOLE | PRINTER | <filename> }
  1828.                     PAGE FORMAT <depth><width><top-margin><bottom-margin>
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.                                          106
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.                                       Appendicies - Limits
  1856.  
  1857.           4.2. Limits
  1858.  
  1859.  
  1860.                string length - 255
  1861.  
  1862.                command line length - 510
  1863.  
  1864.                identifier length - 20
  1865.  
  1866.                DOCASE nesting - 10
  1867.  
  1868.                IF nesting - 10
  1869.  
  1870.                DOWHILE nesting - 10
  1871.  
  1872.                max table columns - 255
  1873.  
  1874.                max length CHAR column size - 255
  1875.  
  1876.                max precision NUMBER column type - 18 decimal digits
  1877.  
  1878.                max memory variables - 64
  1879.  
  1880.                Nesting of programs - 5
  1881.  
  1882.                Concurrent cursors - 5
  1883.  
  1884.                Screen size 25X80
  1885.  
  1886.                Forms - text, fields
  1887.  
  1888.                Menus - options - 9
  1889.  
  1890.                SELECT fields - 20
  1891.  
  1892.                Concurrent windows - 10
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.                                          126
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.           Appendicies - Catalog
  1922.  
  1923.           4.6. Catalog
  1924.  
  1925.           The pBASE catalog consists of system tables.  These tables are just like
  1926.           ordinary user data tables although access to them is somewhat restricted.
  1927.           The system tables consist of:
  1928.  
  1929.                SYSTABLES
  1930.                This table contains a row for every table in the data base.  For each
  1931.                table, it contains the table name, column count, creator, and
  1932.                authorization.
  1933.  
  1934.                SYSCOLUMNS
  1935.                This table contains a row for every table row in the data base.  For
  1936.                each such column, it gives the table name, column name, relative column
  1937.                number, column type and column length.
  1938.  
  1939.                SYSINDEXES
  1940.                This table contains a row for every index in the data base.  For each
  1941.                such index, it gives the table name, column name, index name, and
  1942.                creator.
  1943.  
  1944.                SYSUSERAUTH
  1945.                This table contains a row for each authorized data base user.  For each
  1946.                column, it gives the user identifier, password, and authorization.
  1947.  
  1948.           Since the catalog consists of tables, just like ordinary user tables, it can
  1949.           be queried (and reported) by means of the SELECT command just as ordinary
  1950.           tables can.  For example, to find out what table(s) contain an 'USERID'
  1951.           column:
  1952.  
  1953.                > SELECT tbname FROM syscolumns WHERE colname='USERID'
  1954.  
  1955.           Although the catalog tables can be queried with the SELECT command they
  1956.           CANNOT be updated with UPDATE, DELETE or INSERT commands.  Updating is
  1957.           limited to the DATA DEFINITION commands: CREATE/DROP table, CREATE/DROP
  1958.           INDEX, etc.
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.                                          130
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.